package com.deyuanyun.pic.ae.controller.dto;

import com.deyuanyun.pic.ae.controller.vo.ImgVO;
import com.deyuanyun.pic.ae.domain.SpecificPlace;
import com.deyuanyun.pic.common.util.DateUtil;
import com.deyuanyun.pic.common.util.format.DateFormat;
import com.deyuanyun.pic.pipe.controller.vo.DefaultCommand;

import java.util.Date;
import java.util.List;

/**
 * Created by linwei on 11/9/2016.
 */
public class AEBaseEdit<T> extends DefaultCommand<T> {

    // 主键
    private String id;
    // 记录人
    private String recorder;
    // 记录时间
    private String recordTime;
    // 备注
    private String remarks;
    // 图片
    private List<ImgVO> imgList;
    // 图片id
    private List imgs;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRecorder() {
        return recorder;
    }

    public void setRecorder(String recorder) {
        this.recorder = recorder;
    }

    public String getRecordTime() {
        return recordTime;
    }

    public void setRecordTime(String recordTime) {
        this.recordTime = recordTime;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public List<ImgVO> getImgList() {
        return imgList;
    }

    public void setImgList(List<ImgVO> imgList) {
        this.imgList = imgList;
    }

    public List getImgs() {
        return imgs;
    }

    public void setImgs(List imgs) {
        this.imgs = imgs;
    }

    public void fromDomain(String id, String recorder, Date recordTime, String remarks) {
        // 主键
        this.id = id;
        // 记录人
        this.recorder = recorder;
        // 记录时间
        this.recordTime = DateFormat.format(recordTime);
        // 备注
        this.remarks = remarks;
        // 图片
        this.imgList = ImgVO.queryImgList(id);
    }
}
